﻿Public Class Frm_INTCasioData

    Implements IDServer.IDServer.IDServer


    Public ActionHelp As IDServer.IDServer.ActionBtn = IDServer.IDServer.ActionBtn.ActionHelp
    Private mDataset As DataSet
    Private MasterDS As DataSet
    Private SelectNode As TreeNode
    Private Img As ImageList
    Public bFind As Boolean
    Private WithEvents MainForm As Frm_MainForm


    Public Property SelectObject() As Frm_MainForm
        Get
            Return MainForm
        End Get
        Set(ByVal value As Frm_MainForm)
            MainForm = value
        End Set
    End Property


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Try
            Dim op As New CasioOperate()
            If (op.StationAdtion = CasioOperate.Adtion.NoActiveSync1) Then
                Msg.MsgError("找不到ActiveSync", "錯誤")
                Return
            End If
            If (op.Hasconfig = True) Then
                Dim pcPath As String = op.getPCPath(CasioOperate.PCPathMode.PCToCasio)
                Dim casioPath As String = "\Karon\data\"
                op.Download(pcPath, casioPath)
                op.Close()
                Console.Beep()
                MessageBox.Show("下載數據到Casio成功")
            End If
        Catch ex As Exception
            Exit Try
        End Try
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Try
            Dim op As New CasioOperate()
            If (op.StationAdtion = CasioOperate.Adtion.NoActiveSync1) Then
                Msg.MsgError("找不到ActiveSync", "錯誤")
                Return
            End If
            If (op.Hasconfig = True) Then
                Dim pcPath As String = op.getPCPath(CasioOperate.PCPathMode.CasioToPC)
                Dim casioFilename As String = "\Karon\data\*.*"
                op.Upload(pcPath, casioFilename)
                op.Close()
                Console.Beep()
                MessageBox.Show("從Casio上載數據成功")
            End If
        Catch ex As Exception
            Exit Try
        End Try
    End Sub

    Public Function ActionAdd() As Boolean Implements IDServer.IDServer.IDServer.ActionAdd

    End Function

    Public Function ActionCancel() As Boolean Implements IDServer.IDServer.IDServer.ActionCancel

    End Function

    Public Function ActionDelete() As Boolean Implements IDServer.IDServer.IDServer.ActionDelete

    End Function

    Public Function ActionEdit() As Boolean Implements IDServer.IDServer.IDServer.ActionEdit

    End Function

    Public Function ActionExport() As Boolean Implements IDServer.IDServer.IDServer.ActionExport

    End Function

    Public Function ActionFilter() As Boolean Implements IDServer.IDServer.IDServer.ActionFilter

    End Function

    Public Function ActionGoFirst() As Boolean Implements IDServer.IDServer.IDServer.ActionGoFirst

    End Function

    Public Function ActionGoLast() As Boolean Implements IDServer.IDServer.IDServer.ActionGoLast

    End Function

    Public Function ActionGoNext() As Boolean Implements IDServer.IDServer.IDServer.ActionGoNext

    End Function

    Public Function ActionGoPrevious() As Boolean Implements IDServer.IDServer.IDServer.ActionGoPrevious

    End Function

    Public Function ActionImport() As Boolean Implements IDServer.IDServer.IDServer.ActionImport

    End Function

    Public Function ActionInitialize() As Boolean Implements IDServer.IDServer.IDServer.ActionInitialize

    End Function

    Public Function ActionPrint() As Boolean Implements IDServer.IDServer.IDServer.ActionPrint

    End Function

    Public Function ActionSave() As Boolean Implements IDServer.IDServer.IDServer.ActionSave

    End Function

    Public Function ActionSelect() As Boolean Implements IDServer.IDServer.IDServer.ActionSelect

    End Function
End Class
